package com.atguigu.gmall.list.client;


import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.list.SearchParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 远程调用 搜索微服务
 */
@FeignClient(name = "service-list")
public interface ListFeignClient {

    //增加商品的热度
    @GetMapping("/api/list/inner/hosScore/{skuId}")
    public Result hosScore(@PathVariable(name = "skuId") Long skuId);
    //根据入参对象搜索索引库并返回结果
    @PostMapping("/api/list/search")
    public Result search(@RequestBody SearchParam searchParam) throws Exception;
}
